package seleniumqa;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

import java.util.concurrent.TimeUnit;

/**
 * Created with IntelliJ IDEA.
 * User: admin
 * Date: 19.03.14
 * Time: 20:42
 * To change this template use File | Settings | File Templates.
 */
public class Runner {

    public static void main(String args[])
    {
        System.out.println("test");
        WebDriver driver = new FirefoxDriver();

        driver.get("http://rozetka.com.ua/");
        driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
        driver.findElement(By.xpath("/html/body/div/div[4]/div/div/div[3]/div/div/ul/li/a")).click();
        driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
        driver.findElement(By.xpath("/html/body/div/div[4]/div/div/div/div/div[4]/div/div/div/div/div[2]/div/div/a/img")).click();
        driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
        driver.findElement(By.xpath("/html/body/div/div[3]/div/div/div[2]/div/div[4]/div/div/div/div/div/div/div[3]/a")).click();
        driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
        driver.findElement(By.xpath("/html/body/div/div[3]/div/div/div/div/div/div/div/div/div/div/div[3]/div[2]/div/div[2]/form/button")).click();
        driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
        driver.findElement(By.id("popup-checkout"));
        driver.quit();


    }
}
